/*
 * @Description:强制更新
 * @Autor: lcz
 * @LastEditors: lcz
 * @LastEditTime: 2023-10-12 10:07:35
 */
import { useReducer } from "react";

const updateReducer = (num: number) => (num + 1) % 1_000_000;

const useUpdate = () => {
  const [, update] = useReducer(updateReducer, 0);

  return update;
};

export default useUpdate;
